﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<load href="../Public/Css/public.css" />
<title>{$typename}管理</title>
<script charset="utf-8" src="/Public/Js/editor/kindeditor-min.js"></script>
<script charset="utf-8" src="/Public/Js/editor/lang/zh_CN.js"></script>
<script>
var editor;
KindEditor.ready(function(K) {
	editor = K.create('textarea[name="content"]', {
		allowFileManager : true
	});
});
</script>
</head>

<body leftmargin="2" topmargin="0" marginwidth="0" marginheight="0" oncontextmenu="self.event.returnValue=false">
<noscript><iframe src=*.html></iframe></noscript>
<table width="100%" border="0" align="center" cellpadding="1" cellspacing="1" class="border">
	<tr class="topbg"><td>{$typename}管理</td></tr>
	<tr class="tdbg">
	  <td height="30">&nbsp;&nbsp;<a href="__URL__/index">管理首页</a>&nbsp;|&nbsp;<a href="__URL__/add">添加{$typename}</a></td>
	</tr>
</table>
<br />
<form id="form1" name="form1" method="post" action="__URL__/update" onsubmit="return checkForm()">
  <table width="100%" border="0" align="center" cellpadding="3" cellspacing="1" class="border">
    <tr class="title">
      <td colspan="6" align="center">修改{$typename}</td>
    </tr>
    <tr class="tdbg">
      <td width="17%" height="30" align="right">文章类别：</td>
      <td colspan="5">
	  <select name="cat" id="cat">
		<option value="1" <eq name='list.cat' value='1'>selected='selected'</eq>>课外快讯</option>
		<option value="2" <eq name='list.cat' value='2'>selected='selected'</eq>>教研资讯</option>
      </select>      </td>
    </tr>
    <tr class="tdbg">
      <td height="30" align="right">标&nbsp;&nbsp;题：</td>
      <td colspan="5"><input value="{$list.title}" name="title" type="text" id="title" size="90" maxlength="50" /></td>
    </tr>
    <tr class="tdbg">
      <td height="30" align="right">发布人：</td>
      <td width="12%"><input value="{$list.author}" name="author" type="text" id="author" size="15" maxlength="20" /></td>
      <td width="7%" align="right">来源：</td>
      <td width="17%"><input value="{$list.source}" name="source" type="text" id="source" size="15" maxlength="20" /></td>
      <td width="6%" align="right">排序：</td>
      <td width="41%"><input value="{$list.orderby}" name="orderby" type="text" id="orderby" size="5" maxlength="3" /></td>
    </tr>
    <tr class="tdbg">
      <td height="30" align="right">属&nbsp;&nbsp;性：</td>
      <td colspan="5">
	  <input name="is_ppt" type="checkbox" id="is_ppt" <eq name="list.is_ppt" value="1">checked='checked'</eq> value="1" />幻灯
	  <input name="is_recommend" type="checkbox" id="is_recommend" <eq name="list.is_recommend" value="1">checked='checked'</eq> value="1" />推荐</td>
    </tr>
    <tr class="tdbg">
      <td height="30" align="right">跳&nbsp;&nbsp;转：</td>
      <td colspan="5"><input name="is_url" type="checkbox" id="is_url" value="1" <eq name="list.is_url" value="1">checked='checked'</eq> />跳转&nbsp;&nbsp;跳转网址：<input name="url" type="text" id="url" value="{$list.url}" size="70" maxlength="100" /></td>
    </tr>
    <tr class="tdbg">
      <td height="30" align="right">关键词：</td>
      <td colspan="5"><input value="{$list.keywords}" name="keywords" type="text" id="keywords" size="90" maxlength="100" /></td>
    </tr>
    <tr class="tdbg">
      <td height="30" align="right">摘&nbsp;&nbsp;要：</td>
      <td colspan="5"><textarea name="description" cols="80" rows="5" id="description">{$list.description}</textarea></td>
    </tr>
    <tr class="tdbg">
      <td height="30" align="right">缩略图：</td>
      <td colspan="5"><input readonly="readonly" type="text" value="{$list.imgsrc}" name="imgsrc" />
        <input name="button" type="button" onclick="javascript:window.open('__URL__/upload','','width=300,height=200')" value="上传图片" />
        <font color="#0000ff">提示：上传图片大小不超过200KB</font></td>
    </tr>
    <tr class="tdbg">
      <td height="30" align="right">内容：</td>
      <td colspan="5"><textarea id="content" name="content" style="width:100%;height:300px;visibility:hidden;">{$list.content}</textarea></td>
    </tr>    <tr class="tdbg">
      <td height="30" align="right">&nbsp;</td>
      <td colspan="5">
	  <input type="hidden" name="id" value="{$list.id}" />
	  <input type="submit" name="Submit" value="更新" />
	  <input type="button" onclick="history.go(-1)" value="返回" /></td>
    </tr>
  </table>
</form>
</body>
</html>
<script language="javascript">
function checkForm()
{
	if(document.form1.title.value=="")
	{
		alert("标题不能为空！");
		document.form1.title.focus();
		return false;
	}else
	{
		return true;
	}
}
</script>